<?php
 include_once($_SERVER['DOCUMENT_ROOT'].'/admin/public/header.php');
$res=sel($config,'article',"limit {$off},{$sum}");
pub($config);
$sql='select * from category';
$res_cate=mysql_query($sql);
// var_dump(mysql_fetch_assoc($res_cate));
 ?>
        <div class="crumb-wrap">




            <div class="crumb-list"><i class="icon-font"></i><a href="/jscss/admin">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">分类管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="/jscss/admin/design/index" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="120">选择分类:</th>
                            <td>
                                <select name="cid" id="">
                                <?php while ($row=mysql_fetch_assoc($res_cate)) {
                                    echo '<option value="'.$row['id'].'">'.$row['name'].'</option>';
                                } ?>
                                    
                                   
                                </select>
                            </td>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keywords" value="" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="add.php"><i class="icon-font"></i>新增文章</a>
                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                   
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>
                            <th>ID</th>
                            <th>uid</th>
                            <th>cid</th>
                            <th>图片</th>
                            <th>标题</th>
                            <!-- <th>描述</th> -->
                            <th>时间</th>
                            <th>操作</th>
                        </tr>
                             <?php foreach ($res as $v) {
                            
                        echo  '<tr>
                            <td class="tc"><input name="id[]" value="59" type="checkbox"></td>
                          
                            <td>'.$v['id'].'</td>
                            <td>'.$v['uid'].'</td>
                            <td>'.$v['cid'].'</td>
                            <td><img width=50 src="'.$v['pic'].'"></td>
                            <td>'.$v['title'].'</td>
                            
                            <td>'.date('Y-m-d H:i:s',$v['time']).'</td>
                            
                            
                           
                            <td>
                                <a class="link-update" href="up.php?id='.$v['id'].'">修改</a>
                                <a class="link-del" href="del.php?id='.$v['id'].'">删除</a>
                            </td>
                        </tr>';
                      
                      
                      } ?>
                    </table>
                   
                </div>
            </form>
            <?php echo '<center>';
                   echo page($config,'article');
                   echo '</center>';
                     ?>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>